SECTIONS = ModuleA ModuleB	
CC = gcc
CFLAGS = -o
ORIGIN = main.c
LIBS1 = -L RELEASE -lstuByKey
LIBS2 = -L RELEASE -lcouByKey
LIBS3 = -L RELEASE -lstuByFile
LIBS4 = -L RELEASE -lcouByFile
target1 = RELEASE/MainByKey
target2 = RELEASE/MainByFile
RM = rm
RF = -rf
object = RELEASE/*
all = all.so
MainByKey: $(all)
	$(CC) $(CFLAGS) $(target1) $(ORIGIN) $(LIBS1) $(LIBS2)
        
MainByFile: $(all)
	$(CC) $(CFLAGS) $(target2) $(ORIGIN) $(LIBS3) $(LIBS4)
	
$(all) :
	for dir in $(SECTIONS);do $(MAKE) -C $$dir;done
	
.IPONY:clean
clean:
	$(RM) $(RF) $(object)
